package org.lalib.controller.form;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.faces.bean.SessionScoped;

import org.lalib.acquire.IControllerForm;
import org.lalib.entity.object.EFood;
import org.springframework.stereotype.Controller;

@SessionScoped
@Controller("cFoodForm")
public class CFoodForm implements IControllerForm {

	private static final long serialVersionUID = 1L;
	private Date since;
	private Date till;
	private String name = "";
	
	private List<EFood> foods = new ArrayList<>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getSince() {
		return since;
	}

	public void setSince(Date since) {
		this.since = since;
	}

	public void clear() {
		setTill(null);
		setSince(null);
		setName("");
	}

	public Date getTill() {
		return till;
	}

	public void setTill(Date till) {
		this.till = till;
	}

	public List<EFood> getFoods() {
		return foods;
	}

	public void setFoods(List<EFood> foods) {
		this.foods = foods;
	}
}